<?php

namespace Emoney\EpayBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Emoney\EpayBundle\Entity\sitename
 *
 * @ORM\Table(name="sitename")
 * @ORM\Entity(repositoryClass="Emoney\EpayBundle\Repository\SitenameRepository")
 */
class Sitename
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer $userId
     *
     * @ORM\Column(name="userId", type="integer")
     */
    /**
     * @ORM\ManyToOne(targetEntity="Emoney\UserBundle\Entity\User")
     * @ORM\JoinColumn(name="userId", referencedColumnName="id")
     */
    private $userId;

    /**
     * @var string $url
     *
     * @ORM\Column(name="url", type="string", length=255)
     */
    private $url;
    
    /**
     * @var string  $name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

	    /**
     * Set name
     *
     * @param string $name
     */
	 
	 /**
     * @ORM\OneToMany(targetEntity="Emoney\EpayBundle\Entity\StorePayment", mappedBy="Sitename")
     */
    protected $storepayements;

    /**
     * @ORM\OneToMany(targetEntity="Emoney\EpayBundle\Entity\Retreives", mappedBy="Sitename")
     */
    protected $retreives;
	
    public function setName($name)
    {
        $this->name = $name;
    }
    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @var string  $logo
     *
     * @ORM\Column(name="logo", type="string", length=255, nullable=true)
     */
    private $logo;

    /**
     * Set logo
     *
     * @param string $string
     */
    public function setLogo($logo)
    {
        $this->logo;
	}
    /**
     * Get logo
     *
     * @return string 
     */
    public function getLogo()
    {
        return $this->logo;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set userId
     *
     * @param integer $userId
     */
    public function setUserId($userId)
    {
        $this->userId = $userId;
    }

    /**
     * Get userId
     *
     * @return integer 
     */
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     * Set url
     *
     * @param string $url
     */
    public function setUrl($url)
    {
        $this->url = $url;
    }

    /**
     * Get url
     *
     * @return string 
     */
    public function getUrl()
    {
        return $this->url;
    }
    public function __construct()
    {
        $this->storepayements = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add storepayements
     *
     * @param Emoney\EpayBundle\Entity\StorePayment $storepayements
     */
    public function addStorePayment(\Emoney\EpayBundle\Entity\StorePayment $storepayements)
    {
        $this->storepayements[] = $storepayements;
    }

    /**
     * Get storepayements
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getStorepayements()
    {
        return $this->storepayements;
    }

    /**
     * Add retreives
     *
     * @param Emoney\EpayBundle\Entity\Retreive $retreives
     */
    public function addRetreive(\Emoney\EpayBundle\Entity\Retreive $retreives)
    {
        $this->retreives[] = $retreives;
    }

    /**
     * Get retreives
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getRetreives()
    {
        return $this->retreives;
    }

    /**
     * Add retreives
     *
     * @param Emoney\EpayBundle\Entity\Retreives $retreives
     */
    public function addRetreives(\Emoney\EpayBundle\Entity\Retreives $retreives)
    {
        $this->retreives[] = $retreives;
    }
    
     /**
     * toString
     *
     */
    public function __toString()
    {
        return $this->name .'-'.$this->url;
    }
}